$(function(){
	function active(a,b,c){
		$(a).click(function(event){
			var e=event||window.event;
			e.stopPropagation();
			$(this).css("border-color","#ff0c0d")
			e.cancleBubble=true;
			$(c).slideToggle();
			$(this).children(c).on("click","li",function(){
				$(this).css("border-color","#dbdbdb");
				var lsqoption=$(this).html();
				$(this).parent().prev(b).children("input").val(lsqoption);
			});
			
		});
		$(document).click(function(){
			$(c).slideUp();
			$(a).css("border-color","#dbdbdb")
		});
		
	
	}
	active(".company",".companyCon",".companyList");
	active(".major",".majorCon",".majorList");
	active(".education",".educationCon",".educationList");
	active(".startTime",".startTimeCon",".startTimeList");
	active(".zhiwei",".zhiweiCon",".zhiweiList");
	active(".endTime",".endTimeCon",".endTimeList");
});
